package vip.xiaonuo.sys.xxl;

import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import vip.xiaonuo.common.tenant.TenantContext;
import vip.xiaonuo.sys.modular.wechat.checkin.service.WechatCheckinDataService;

/**
 * @author zjt
 * @description
 * @date 2025/7/18 16:05
 */
@Component
@RequiredArgsConstructor
public class WechatXxlJob {

    private final WechatCheckinDataService wechatCheckinDataService;

    @XxlJob("syncCheckinJobHandler")
    public void syncCheckinJobHandler() {
        XxlJobHelper.log("开始同步打卡数据");
        TenantContext.ignoreHandle(wechatCheckinDataService::syncCheckin);
    }
}
